<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::resource('/','ArticlesController');
Route::resource('/articles','ArticlesController');

//markdown 文章显示
Route::post('markdown','ArticlesController@markdown')->name('markdown');


// ajax上传文件
Route::get('avater','ArticlesController@avater');
Route::post('photo','ArticlesController@photo');

// 相册资源路由
Route::get('/home', 'AlbumsController@index')->name('home');

Route::resource('albums','AlbumsController');

Route::resource('photos','PhotosController');

//登录注册

// 认证路由...
Route::get('auth/login', 'Auth\AuthController@getLogin');
Route::post('auth/login', 'Auth\AuthController@postLogin');
Route::get('auth/logout', 'Auth\AuthController@getLogout');

// 注册路由...
Route::get('auth/register', 'Auth\AuthController@getRegister');
Route::post('auth/register', 'Auth\AuthController@postRegister');

// 无线递归分类
Route::resource('cate','CateController');

// 购物车
Route::resource('shop','ShopController');
Route::get('/shopping/{id}','ShopController@shopping');

Route::get('/create','ShopController@create')->name('create');

Route::get('/del','ShopController@del');

Route::get('/dell/{rowId}','ShopController@dell');

